package com.uduemc.biso.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import com.uduemc.biso.service.CustomerService;

@RestController
public class CustomerController {
	
	@Value("${logging.level.com.uduemc.biso.mapper}")
	private String v;
	
	@Autowired
	private CustomerService customerServiceImpl;
	
	@GetMapping("/")
	public Object index() {
		return "Hello Jeff!! : " + v;
	}

	@GetMapping("/customer/get/{id}")
	public Object get(@PathVariable("id") Integer id) {
		System.out.println("id: " + id);
		return customerServiceImpl.get(id);
	} 
	
}
